package com.habdqn.studentmanager.bean;

import java.util.List;

/**
 * @author Administrator
 * 系统菜单实体类
 * 2017年5月13日
 * 
 */
public class SysMenu extends Bean {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 系统菜单
	 */
	private Integer id;
	
	/**
	 * 菜单名称
	 */
	private String name;
	
	/**
	 * 菜单地址
	 */
	private String url;
	
	/**
	 * 是否启用
	 * 1 启用
	 * 0 未启用
	 */
	private String enabled;
	
	/**
	 * 上级菜单
	 */
	private SysMenu parent;
	
	/**
	 * 子菜单列表
	 */
	private List<SysMenu> subMenus;
	
	/**
	 * 备用字段
	 */
	private String ext1;

	/**
	 * 备用字段
	 */
	private String ext2;
	
	/**
	 * 备用字段
	 */
	private String ext3;

	public static SysMenu makeMenu(Integer id, String name, String url, String enabled, Integer parent) {
		
		SysMenu menu = new SysMenu();
		menu.id = id;
		menu.name = name;
		menu.url = url;
		menu.enabled = enabled;
		SysMenu parentMenu = new SysMenu();
		parentMenu.id = parent;
		menu.parent = parentMenu;
		
		return menu;
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getEnabled() {
		return enabled;
	}

	public void setEnabled(String enabled) {
		this.enabled = enabled;
	}

	public String getExt1() {
		return ext1;
	}

	public void setExt1(String ext1) {
		this.ext1 = ext1;
	}

	public String getExt2() {
		return ext2;
	}

	public void setExt2(String ext2) {
		this.ext2 = ext2;
	}

	public String getExt3() {
		return ext3;
	}

	public void setExt3(String ext3) {
		this.ext3 = ext3;
	}

	public SysMenu getParent() {
		return parent;
	}

	public void setParent(SysMenu parent) {
		this.parent = parent;
	}

	public List<SysMenu> getSubMenus() {
		return subMenus;
	}

	public void setSubMenus(List<SysMenu> subMenus) {
		this.subMenus = subMenus;
	}
	
}
